package com.twu.model;

/**
 * Created by Janu on 09/06/14.
 * Class: Book.java
 * Methods: Constructors
 *          public void setBookAvailable()
 *          public void setBookNotAvailable()
 *          Getters for all parameters
 */
public class Book {

    //Parameters
    private String bookCode;
    private String bookName;
    private String bookAuthor;
    private int bookYearPublished;
    private boolean bookAvailability;
    private String bookCheckedOutBy;


    //Constructors
    public Book(){
        bookCode = "";
        bookName = "";
        bookAuthor = "";
        bookYearPublished = 0;
        bookAvailability = false;
        bookCheckedOutBy = "";

    }

    public Book(String bCode, String bName){
        bookCode = bCode;
        bookName = bName;
        bookAuthor = "";
        bookYearPublished = 0;
        bookAvailability = true;
        bookCheckedOutBy = "";

    }

    public Book(String bCode, String bName, String bAuthor){
        bookCode = bCode;
        bookName = bName;
        bookAuthor = bAuthor;
        bookYearPublished = 0;
        bookAvailability = true;
        bookCheckedOutBy = "";

    }

    public Book(String bCode, String bName, String bAuthor, int bYearPublished, boolean bAvailability){
        bookCode = bCode;
        bookName = bName;
        bookAuthor = bAuthor;
        bookYearPublished = bYearPublished;
        bookAvailability = bAvailability;
        bookCheckedOutBy = "";

    }

    public void setBookAvailable(){ this.bookAvailability=true; }

    public void setBookNotAvailable(){ this.bookAvailability=false; }

    //Getters
    public boolean getBookAvailability() {
        return bookAvailability;
    }

    public String getBookCode() {
        return bookCode;
    }

    public String getBookName() {
        return bookName;
    }

    public String getBookAuthor() {
        return bookAuthor;
    }

    public int getBookYearPublished() {
        return bookYearPublished;
    }

    public void setBookCheckedOutBy(String s) {
        this.bookCheckedOutBy = s;
    }

    public String getBookCheckedOutBy(){
        return this.bookCheckedOutBy;
    }
}
